import org.centric.generator.GeneratorFacade;
import org.centric.generator.GeneratorProperties;

public class GenMain {
	public static void main(String[] args) throws Exception {
		if (args.length == 0) {
			System.out.println("请输入表名");
			return;
		}
		GeneratorFacade g = new GeneratorFacade();
		g.deleteOutRootDir(); // 删除生成器的输出目录
		g.generateByTable(args[0], "template");
		Runtime.getRuntime().exec("cmd.exe /c start " + GeneratorProperties.getRequiredProperty("outRoot"));
	}
}
